﻿using System.Text;

namespace PixivVideo.Currency.TextUtils
{
    internal class Transcoding
    {
        /// <summary>
        ///UrlEncode 编码
        /// </summary>
        /// <param name="tag"></param>
        /// <returns></returns>
        internal string UrlEncodeToUtf8(string tag)
        {
            return System.Web.HttpUtility.UrlEncode(tag, Encoding.UTF8);
        }

        /// <summary>
        ///UrlDecode 解码
        /// </summary>
        /// <param name="tag"></param>
        /// <returns></returns>
        internal string UrlDecodeToUtf8(string tag)
        {
            return System.Web.HttpUtility.UrlDecode(tag, Encoding.UTF8);
        }

        /// <summary>
        ///HtmlDecode 解码
        /// </summary>
        /// <param name="Text"></param>
        /// <returns></returns>
        internal string HtmlDecodeToUtf8(string Text)
        {
            return System.Web.HttpUtility.HtmlDecode(Text);
        }

        /// <summary>
        ///HtmlDecode 解码
        /// </summary>
        /// <param name="Text"></param>
        /// <returns></returns>
        internal string HtmlEncodeToUtf8(string Text)
        {
            return System.Web.HttpUtility.HtmlEncode(Text);
        }
    }
}